package com.fish.service.impl.account;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.fish.account.dao.AccountDAO;
import com.fish.account.dao.BalanceDAO;
import com.fish.account.po.Account;
import com.fish.account.po.Balance;
import com.fish.common.constant.QueryPage;
import com.fish.passport.po.PassCode;
import com.fish.service.account.AccountService;
import com.fish.utils.StringUtil;

public class AccountServiceImpl implements AccountService {
	private AccountDAO accountDAO;
	private BalanceDAO balanceDAO;
	
	@Override
	public Account queryAccountByPrimaryKey(Account account) {
		return accountDAO.queryAccountByPrimaryKey(account);
	}

	@Override
	public void insertAccount(Account account) {
		accountDAO.insertAccount(account);
	}

	@Override
	public void updateAccount(Account account) {
		accountDAO.updateAccount(account);
	}

	@Override
	public List<Account> queryAccountByObject(Account account) {
		return accountDAO.queryAccountByObject(account);
	}

	public void setAccountDAO(AccountDAO accountDAO) {
		this.accountDAO = accountDAO;
	}

	@Override
	public Double queryLastBalanceByBankId(Account account) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Long queryAccountCountByObject(Account account) {
		return this.accountDAO.queryAccountCountByObject(account);
	}

	@Override
	public List<Account> queryAccountByObject(Account account, QueryPage queryPage) {
		return this.accountDAO.queryAccountObject(account,queryPage);
	}

	@Override
	public Balance queryBalanceByUser(String userId) {
		return balanceDAO.queryBalanceByUser(userId);
	}

	public void setBalanceDAO(BalanceDAO balanceDAO) {
		this.balanceDAO = balanceDAO;
	}

}
